package com.zyz.api.callback;

import com.zyz.base.enums.ResponseCodeEnum;
import com.zyz.base.request.PageCondition;
import com.zyz.base.response.Message;
import com.zyz.base.response.PageMessage;

public class CommonCallback {

    protected Message getResponse() {
        return new Message<>(ResponseCodeEnum.CALL_TIME_OUT_ERROR.getCode(), ResponseCodeEnum.CALL_TIME_OUT_ERROR.getMessage());
    }

    protected PageMessage getPageResponse(PageCondition page) {
        return new PageMessage(ResponseCodeEnum.CALL_TIME_OUT_ERROR.getCode(), ResponseCodeEnum.CALL_TIME_OUT_ERROR.getMessage(), page);
    }
}